# Important Note:

this project has been archived and migrated to codeberg. To access the project on codeberg,

[visit this Link](https://codeberg.org/alimiracle/telegram-censor-bot)

# telegram-censor-bot

telegram-censor-bot is a Telegram bot that filters out unwanted words and phrases in group chats. It helps to maintain a clean and respectful environment for communication.

## Features

- Automatically detects and blocks messages containing banned words.
- Kicks users who post inappropriate content.
- Deletes offending messages to keep the chat clean.

## Usage

1. Add telegram-censor-bot in your Telegram group.
2. Configure the bot to have necessary permissions to delete messages and kick users.
3. Provide a list of banned words and phrases in a text file.
4. Start the telegram-censor-bot application.
5. telegram-censor-bot will monitor the group chat and take actions based on the content of the messages.

## Installation

1. Clone the telegram-censor-bot repository:


```bash
git clone https://notabug.org/alimiracle/telegram-censor-bot
```

2. Install the required dependencies:

```bash
go get
```

3. Set the environment variables:

- `TELEGRAM_BOT_TOKEN`: Your Telegram bot token.
- `BANNED_WORDS_FILE`: The path to the text file containing the list of banned words.

4. Build and run the telegram-censor-botapplication:
```bash
go build
./telegram-censor-bot
```

## Configuration

Before running the bot, make sure to configure it properly:

1. Create a new Telegram bot and obtain the bot token from BotFather.
2. Set the necessary permissions for the bot in your group chat (delete messages, ban users).
3. Prepare a text file containing the list of banned words and phrases, with each entry on a new line.

## License

This project is licensed under the GPL v3 License.
